7495e08a5719e1ba3c1527d0a6e0dbf86553fdbc,core/src/test/java/brooklyn/entity/rebind/RebindEntityTest.java,RebindEntityTest,testRestoresConfigKeys,#,353

Before Change


    
    @Test
    public void testRestoresConfigKeys() throws Exception {
        TestEntity origE = new TestEntityImpl(origApp);
        origE.setConfig(TestEntity.CONF_LIST_PLAIN, ImmutableList.of("val1", "val2"));
        origE.setConfig(TestEntity.CONF_MAP_PLAIN, ImmutableMap.of("akey", "aval"));
        Entities.startManagement(origApp, managementContext);
        
        MyApplication newApp = rebind();

After Change


    
    @Test
    public void testRestoresConfigKeys() throws Exception {
        TestEntity origE = origApp.createAndManageChild(EntitySpecs.spec(TestEntity.class)
                .configure(TestEntity.CONF_LIST_PLAIN, ImmutableList.of("val1", "val2"))
                .configure(TestEntity.CONF_MAP_PLAIN, ImmutableMap.of("akey", "aval")));
        
        TestApplication newApp = rebind();
        final TestEntity newE = (TestEntity) Iterables.find(newApp.getChildren(), Predicates.instanceOf(TestEntity.class));